package com.md.api.dao;

import com.md.api.entity.UserCouponRecord;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface UserCouponRecordMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(UserCouponRecord record);

    UserCouponRecord getByCouponRecordId(@Param("couponRecordId")String couponRecordId);

    List<UserCouponRecord> selectAll();

    int updateStatus(@Param("couponRecordId")String couponRecordId,@Param("status")Integer status);

    List<UserCouponRecord> myCoupon(@Param("userId") String userId,@Param("status")  Integer status,@Param("useWay") String useWay);
    List<UserCouponRecord> availableCoupon(@Param("userId") String userId,@Param("useWay") Integer useWay);

    List<UserCouponRecord> getValidByCouponId(@Param("couponId")String couponId);
}